<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.sql.*,java.io.*,javax.servlet.*,javax.servlet.http.*,java.sql.Connection,java.sql.DriverManager,java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*" %> 
<%@ page import="java.io.*" %> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<h1>CASE DETAILS</h1>
<%try
{

ResultSet rs;
Connection con =org.tmad.ocms.dao.ConnectionManager.getDbConnection();
Statement stmt =con.createStatement();
 rs =stmt.executeQuery("select c.name,h.name,r.person_name,r.address,r.city,r.case_summary,r.case_description,r.contact_mobile,r.contact_phone,r.contact_email from case_category c,help_category h,casereg r where c.id=r.case_category_id and h.id=r.help_category_id ");
 
%>
<TABLE cellpadding="3" border="1" > 
<TR><TH>CASETYPE</TH>
<TH>HELPTYPE</TH>
<TH>PERSONNAME</TH>
<TH>ADDRESS</TH>
<TH>CITY</TH>
<TH>CASESUMMARY</TH>
<TH>DESCRIPTION</TH>
<TH>MOBILE</TH>
<TH>CONTACT PHONE</TH>
<TH>EMAILID</TH></TR>
<% 
while (rs.next()) 
{ 
%> 
 <TR> 
<TD><%=rs.getString("name")%></TD> 
<TD><%=rs.getString(2)%></TD> 
<TD><%=rs.getString("person_name")%></TD> 
<TD><%=rs.getString("address")%></TD>
<TD><%=rs.getString(4)%></TD> 
<TD><%=rs.getString(6)%></TD> 
<TD><%=rs.getString(7)%></TD> 
<TD><%=rs.getString("contact_mobile")%></TD> 
<TD><%=rs.getString("contact_phone")%></TD> 
<TD><%=rs.getString("contact_email")%></TD> 
</TR>
<% 
} 

%> 
<% 

// close all the connections.

} 
catch (Exception ex) 
{ 


out.println("Unable to connect to database."); 
} 
%> 

</TABLE> 
</body> 
</html>


